package com.cnswhy.cloud.server.core.entity;

import cn.afterturn.easypoi.excel.annotation.Excel;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.cnswhy.cloud.common.core.base.entity.Entity;
import com.cnswhy.cloud.server.common.entity.enumeration.TransType;
import com.cnswhy.cloud.server.common.entity.enumeration.WalletType;
import com.cnswhy.cloud.server.common.entity.enumeration.WithdrawType;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.*;
import lombok.experimental.Accessors;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.time.LocalDateTime;

import static com.baomidou.mybatisplus.annotation.SqlCondition.LIKE;

/**
 * <p>
 * 实体类
 * 
 * </p>
 *
 * @author cnswhy
 * @since 2020-10-14
 */
@Data
@ToString(callSuper = true)
@ApiModel(value = "CustomerWalletTransDtl", description = "")
@EqualsAndHashCode(callSuper=false)
public class CustomerWalletTransDtl extends WalletTransDtl{

    private static final long serialVersionUID = -7088182198813880919L;
    /**
     * 客户ID
     */
    @ApiModelProperty(value = "登录账号")
    @NotNull(message = "登录账号不能为空")
    @TableField("login_name")
    @Excel(name = "登录账号")
    private Long loginName;

    /**
     * 钱包类型
     */
    @ApiModelProperty(value = "钱包类型")
    @NotNull(message = "钱包类型")
    @TableField("wallet_type")
    @Excel(name = "钱包类型", replace = {"余额_BALANCE", "拼购券_COUPON",
            "拼购券总计_TOTAL_COUPON", "拼团值_SPELL_VALUE", "贡献值_CONTRIBUTION_VALUE",
            "拼团收益_SPELL_BALANCE", "拼团收益_CONTRIBUTION_BALANCE",
            "爱心收益_LOVE_BALANCE", "分享收益_SHARE_BALANCE",
            "队长值_TEAM_VALUE",
            "队长分红_TEAM_BALANCE",
            "消费值_CONSUME_VALUE",
            "消费分红_CONSUME_BALANCE",
            "红利分润_SPLIT_BALANCE",
            "小队红包_SMALL_BALANCE",
            "_null"})
    private WalletType walletType;

    /**
     * 可用余额
     */
    @ApiModelProperty(value = "可用余额")
    @NotNull(message = "可用余额不能为空")
    @TableField("avlb_balance")
    @Excel(name = "可用余额")
    private Long avlbBalance;
}
